<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tld/importTag.tld" prefix="importTag"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib uri="/WEB-INF/tld/mallutil.tld" prefix="mu" %>
<%@page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@page import="org.apache.commons.lang.math.RandomUtils"%>
<c-rt:set var="hostName" value='<%=request.getHeader("Host")%>'/>
<c-rt:set var="frontHtmlPath" value='<%=ServerValue.getFrontApachePath()%>'/>
<c-rt:set var="frontContentHtmlPath" value='<%=ServerValue.getFrontContentHtmlPath()%>'/>
<c-rt:set var="imgDomain" value='<%=ServerValue.getImgDomain()%>'></c-rt:set>
<script type="text/javascript" charset="UTF-8" src="/js/jquery.flash.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="/js/jquery.random.js"></script>
<script type="text/javascript" charset="UTF-8" src="/js/indexV5.js"></script>
<script type="text/javascript" src="/js/jquery.pngFix.pack.js"></script>
<script type="text/javascript">
$(function(){
    $(document).pngFix();
});
if((!window.location.href.match(/hpp=ms/i))&&navigator.userAgent.match(/Android|iPhone|BlackBerry|UCWEB/i)){
	window.location = 'http://m.yaodian100.com';	
}
</script>
<script type="text/javascript" src="${imgDomain}/js/rec.js">
{
"mid":27,
"pid":"home",
"rcat":"<%=ServerValue.getFrontTopCategoryIdList()%>",
<c-rt:if test="${!empty mu:memberId()}">
"uid":"${mu:memberId()}",
</c-rt:if>
"layout":"home"
}
</script>
<script src="/js/jquery.lazyload.yaodian100.js"></script>
<script src="/js/yaodian100_lazyloadIndex.js"></script>
<input type="hidden" value="${imgDomain}" id="imageDomain" />

<div class="ad-leader">
<c-rt:set var="topSpanNum"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
<c-rt:set var="topSpan"><importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_TOPSPAN_${topSpanNum}.html"/></c-rt:set>
<c-rt:choose>
	<c-rt:when test="${not empty topSpan}">${topSpan}</c-rt:when>
	<c-rt:otherwise>
		<importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_TOPSPAN_1.html"/>
	</c-rt:otherwise>
</c-rt:choose>
</div>
<div class="content">		
	<importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_MAINGOLD_V3.html"/>
	<!-- 熱銷商品 -->
    <div class="hotsale">
    <!-- 熱銷banner -->
    <div class="hot-bnr">
    	<c-rt:set var="hotBarNum"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
		<c-rt:set var="hotBar"><importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_HOTSALE_BANNER_${hotBarNum}.html"/></c-rt:set>
		<c-rt:choose>
			<c-rt:when test="${not empty hotBar}">${hotBar}</c-rt:when>
			<c-rt:otherwise>
				<importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_HOTSALE_BANNER_1.html"/>
			</c-rt:otherwise>
		</c-rt:choose>
    </div>
	<importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_HOTSALE_V5.html"/>
   	</div>
    <!-- 熱銷商品 -->
</div>
<div class="right-bar">
	<importTag:static path="${frontContentHtmlPath}IDX/NEWS_V3.html"/>
	<!-- 秒杀 -->
  	<importTag:static path="${frontContentHtmlPath}IDX/IDX_TIME_LIMIT_SALE_V5.html"/>
    <!-- 秒杀 -->
    
    <!-- 耀雜誌 -->
		<div class="yao-mgz">
		<c-rt:choose>
			<c-rt:when test="${hostName eq 'pclady.yaodian100.com'}">
			<importTag:static path="${frontHtmlPath}pages/IDX/YAO_MGZ_pclady.html" />
			</c-rt:when>
			<c-rt:otherwise>
			<importTag:static path="${frontHtmlPath}pages/IDX/YAO_MGZ.html" />
			</c-rt:otherwise>
		</c-rt:choose>
		</div>
	<!-- 耀雜誌 -->
        <!-- 銀行分期 -->
        <div class="bank-bnr">
        	<c-rt:set var="bankBannerNum"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
			<c-rt:set var="bankBanner"><importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_BANK_BANNER_${bankBannerNum}.html"/></c-rt:set>
			<c-rt:choose>
				<c-rt:when test="${not empty bankBanner}">${bankBanner}</c-rt:when>
				<c-rt:otherwise>
					<importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_BANK_BANNER_1.html"/>
				</c-rt:otherwise>
			</c-rt:choose>
		</div>
        <!-- 銀行分期 -->
</div>

    <!-- 大腰帶 -->
    <div class="big-bar">
    	<c-rt:set var="waistLineNum"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
		<c-rt:set var="waistLine"><importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_WAISTLINE_V5_${waistLineNum}.html"/></c-rt:set>
		<c-rt:choose>
			<c-rt:when test="${not empty waistLine}">${waistLine}</c-rt:when>
			<c-rt:otherwise>
				<importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_WAISTLINE_V5_1.html"/>
			</c-rt:otherwise>
		</c-rt:choose>
    </div>
    <!-- 大腰帶 -->
    <!-- 活動特輯 -->
    <c-rt:set var="specialActNumL"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
	<c-rt:set var="specialActL"><importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_SPECIAL_ACT_L_${specialActNumL}.html"/></c-rt:set>
	<c-rt:choose>
		<c-rt:when test="${not empty specialActL}">${specialActL}</c-rt:when>
		<c-rt:otherwise>
			<importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_SPECIAL_ACT_L_1.html"/>
		</c-rt:otherwise>
	</c-rt:choose>
	<c-rt:set var="specialActNumR"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
	<c-rt:set var="specialActR"><importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_SPECIAL_ACT_R_${specialActNumR}.html"/></c-rt:set>
		<c-rt:choose>
		<c-rt:when test="${not empty specialActR}">${specialActR}</c-rt:when>
		<c-rt:otherwise>
			<importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_SPECIAL_ACT_R_1.html"/>
		</c-rt:otherwise>
	</c-rt:choose>
     <!-- 活動特輯 -->
     <!-- 各館 -->
     <c:forEach var="saleParam" items="${fn:split('S,F,L,H,D', ',')}">
        <c-rt:set var="saleNum"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
		<c-rt:set var="saleArea"><importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_SALE_V5_${saleParam}_${saleNum}.html"/></c-rt:set>
		<c-rt:choose>
		<c-rt:when test="${not empty saleArea}">${saleArea}</c-rt:when>
		<c-rt:otherwise>
			<importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_SALE_V5_${saleParam}_1.html"/>
		</c-rt:otherwise>
		</c-rt:choose> 
     </c:forEach>
     <!-- 各館 -->
     <!-- 品牌推薦 -->
	<c-rt:set var="brandNum"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
	<c-rt:set var="brandRec"><importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_BRAND_RECOMMEND_${brandNum}.html"/></c-rt:set>
	<c-rt:choose>
		<c-rt:when test="${not empty brandRec}">${brandRec}</c-rt:when>
		<c-rt:otherwise>
			<importTag:static path="${frontContentHtmlPath}${hostName}/IDX/IDX_BRAND_RECOMMEND_1.html"/>
		</c-rt:otherwise>
	</c-rt:choose>	
	 <!-- 品牌推薦 -->
<!-- 商品類別 -->
<div class="pdcalist"><importTag:static path="${frontHtmlPath}${hostName}/pages/IDX/CATEGORY_v5.html" /></div>
<!-- 商品類別 -->

<span id="systemTime" style="display:none;"><%=System.currentTimeMillis()/1000%></span>